using RuoVea.ExSugar.Entity;
using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace Gantt.Models;

/// <summary>
/// 甘特图优先级
/// </summary>
[SugarTable(nameof(GanttLevel), "甘特图优先级")]
public class GanttLevel : EntityBase
{
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    [StringLength(255)]
    [SugarColumn(ColumnDescription = "名称")]
    public string? Name { get; set; }

    /// <summary>
    /// 颜色
    /// </summary>
    [Required]
    [StringLength(255)]
    [SugarColumn(ColumnDescription = "颜色")]
    public string? Color { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    [SugarColumn(ColumnDescription = "排序", IsNullable = true, DefaultValue = "10")]
    public int Sort { get; set; }
}